package com.czkt.controller;

import com.czkt.pojo.SysUser;
import com.czkt.service.Impl.UserServiceImpl;
import com.czkt.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class UserController {
    @Autowired
    UserServiceImpl userServiceImpl;

    @RequestMapping("/getList")
    @ResponseBody
    public Object getList(){
        return userServiceImpl.getUserList();
    }

    @RequestMapping("/")
    @ResponseBody
    public String index(){
        return "hallo SB邓博文";
    }

    @RequestMapping("/AddUser")
    @ResponseBody
    public Object AddUser(SysUser sysUser){
        return userServiceImpl.AddUser(sysUser);
    }
}
